package design_principles.proxy.code.service.impl;

import design_principles.proxy.code.dao.OrderDao;
import design_principles.proxy.code.dto.Order;
import design_principles.proxy.code.service.IOrderService;

public class OrderServiceImpl implements IOrderService {
    private final OrderDao dao;

    public OrderServiceImpl() {
        this.dao = new OrderDao();
    }

    public OrderServiceImpl(OrderDao dao) {
        this.dao = dao;
    }

    @Override
    public int createOrder(Order order) {
        return dao.insert(order);
    }

}